import axios from '../../axios/index'

export interface issueInterface {
    content: string
    id?: string
    title: string
}

export const issueAdd = (data: issueInterface) => {
    return axios({
        method: 'post',
        url: '/api/system/faq/manage/add',
        data
    })
}

export const issueEdit = (data: issueInterface) => {
    return axios({
        method: 'post',
        url: '/api/system/faq/manage/edit',
        data
    })
}
export const issueDetailedById = (id: string) => {
    return axios({
        method: 'get',
        url: '/api/system/faq/manage/getDetailById',
        params: { id }
    })
}

export const issueList = (current: number, size: number) => {
    return axios({
        method: 'get',
        url: '/api/system/faq/manage/getPageList',
        params: { current, size }
    })
}

export const issueDisable = (disable: number, id: string) => {
    return axios({
        method: 'post',
        url: '/api/system/faq/manage/updateDisable',
        data: { disable, id }
    })
}
